﻿using System;

public abstract class Animal
{
    public string Name { get; set; }

    protected Animal(string name)
    {
        Name = name;
    }
    public abstract void Enjoy();
}

public class Cat : Animal
{
    public string EyesColor { get; set; }

    public Cat(string name, string eyesColor) : base(name)
    {
        EyesColor = eyesColor;
    }

    public override void Enjoy()
    {
        Console.WriteLine($"{Name}是一只眼睛为{EyesColor}的猫，它高兴时会发出'喵喵'的叫声，并摇尾巴。");
    }
}

public class Dog : Animal
{
    public string FurColor { get; set; }

    public Dog(string name, string furColor) : base(name)
    {
        FurColor = furColor;
    }
    public override void Enjoy()
    {
        Console.WriteLine($"{Name}是一只毛色为{FurColor}的狗，它高兴时会发出'汪汪'的叫声，并摇尾巴。");
    }
}

public class Lady
{
    public string Name { get; set; }
    public Animal Pet { get; set; }

    public Lady(string name, Animal pet)
    {
        Name = name;
        Pet = pet;
    }

    public void MyPetEnjoy()
    {
        Console.Write($"{Name}的宠物");
        Pet.Enjoy();
    }
}

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("=== 动物与女士类演示 ===\n");

      
        Cat cat = new Cat("咪咪", "蓝色");
        Lady ladyZhang = new Lady("张女士", cat);
        ladyZhang.MyPetEnjoy();

        Console.WriteLine();


        Dog dog = new Dog("旺财", "棕色");
        Lady ladyWang = new Lady("王女士", dog);
        ladyWang.MyPetEnjoy();

        Console.WriteLine("\n=== 演示结束 ===");
        Console.WriteLine("\n按任意键退出...");
        Console.ReadKey();
    }
}
